package com.bank.service.impl;


import com.bank.service.OrderService;
import com.bank.service.ProductService;
import com.bank.service.pojo.Order;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

@Component
public class OrderServiceImpl implements OrderService {
    @DubboReference(timeout = 5000,version = "1.0",group = "product-server")
    private ProductService productService;

    @Override
    public Order selectOrderById(Integer id) {
        logger.info("订单服务查询订单信息...");
        return new Order(id, "order-001", "中国", 22788D,
                productService.selectProductList());
    }
}
